<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected static $front = null;
	
	protected function _initNameSpace()
	{
		Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
	}
	
	protected function _initLoadConfiguration()
	{
		$conf = new Zend_Config_Ini(APPLICATION_PATH.'/configs/application.ini', APPLICATION_ENV);
		Zend_Registry::set(APP_CONFIGURATION, $conf);
	}
	
	protected function _initFront()
	{
		self::$front = Zend_Controller_Front::getInstance();
		if(APPLICATION_ENV == 'development') {
			self::$front->throwExceptions(true);
		} else {
			self::$front->throwExceptions(false);
		}
	}
	
	protected function _initLoadPlugin()
	{
		self::$front->registerPlugin(new My_Plugins_Env());
	}
}

